//
//  LPTMedicineConfirmTableViewCell.m
//  LPTClient
//
//  Created by mac on 2018/12/15.
//  Copyright © 2018年 zhaodd. All rights reserved.
//

#import "LPTMedicineConfirmTableViewCell.h"

@interface LPTMedicineConfirmTableViewCell ()

@property (weak, nonatomic) IBOutlet UIButton *confirmBtn;

@end

@implementation LPTMedicineConfirmTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setType:(LPTConfirmType)type
{
    _type = type;
    
    if (type == kEditType) {
        [self.confirmBtn setTitle:@"完成" forState:UIControlStateNormal];
    }else{
        [self.confirmBtn setTitle:@"编辑处方" forState:UIControlStateNormal];
    }
}

- (IBAction)deleteAction:(id)sender {
    
    if (self.delegate && [self.delegate respondsToSelector:@selector(medicineConfirmTableViewCell:didclickAtIndex:)]) {
        [self.delegate medicineConfirmTableViewCell:self didclickAtIndex:0];
    }
}

- (IBAction)sureAction:(id)sender {
    
    if (self.delegate && [self.delegate respondsToSelector:@selector(medicineConfirmTableViewCell:didclickAtIndex:)]) {
        [self.delegate medicineConfirmTableViewCell:self didclickAtIndex:1];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
